package com.hk.web.dto.article;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hk.commons.domain.entity.IdEntity;
import com.hk.commons.enums.ArticleOnTopType;
import com.hk.commons.enums.ArticleStatus;
import com.hk.commons.enums.ArticleType;
import com.hk.commons.enums.Channel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Created by anti on 2016-11-16.
 */

public class ArticleDTO extends IdEntity{

    private String title;

    private ArticleType type = ArticleType.NONE;

    private ArticleOnTopType onTop = ArticleOnTopType.NONE;

    private ArticleStatus status = ArticleStatus.DRAFT;

    private Channel channel = Channel.PC;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date eventDate;

    private String summary;

    private String content;

    private String videoUrl;

    private String imageUrl;

    private String outSideUrl;

    private String author;

    private String source;

    private Long clickCounts = 0L;

    private String displayOrder;

    private String uuid;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public Long getClickCounts() {
        return clickCounts;
    }

    public void setClickCounts(Long clickCounts) {
        this.clickCounts = clickCounts;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public ArticleType getType() {
        return type;
    }

    public void setType(ArticleType type) {
        this.type = type;
    }

    public ArticleOnTopType getOnTop() {
        return onTop;
    }

    public void setOnTop(ArticleOnTopType onTop) {
        this.onTop = onTop;
    }

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getEventDate() {
        return eventDate;
    }

    public void setEventDate(Date eventDate) {
        this.eventDate = eventDate;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public ArticleStatus getStatus() {
        return status;
    }

    public void setStatus(ArticleStatus status) {
        this.status = status;
    }

    public Channel getChannel() {
        return channel;
    }

    public void setChannel(Channel channel) {
        this.channel = channel;
    }

    public String getOutSideUrl() {
        return outSideUrl;
    }

    public void setOutSideUrl(String outSideUrl) {
        this.outSideUrl = outSideUrl;
    }

    public String getDisplayOrder() {
        return displayOrder;
    }

    public void setDisplayOrder(String displayOrder) {
        this.displayOrder = displayOrder;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }
}
